﻿using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;

namespace DTO
{
    [DataContract(IsReference = true)]
    //    [KnownType(typeof(DepartmentBase))]
    public class DTOChilds : DTOBase
    {
        [DataMember]
        public IEnumerable<DTOBase> Childs { get; set; }

        [DataMember]
        public int ChildsCount { get { return (Childs != null) ? Childs.Count() : 0; } }
    }
}